package ar.com.angrymachine.hunter.activities;

import java.awt.Graphics;
import java.awt.Rectangle;

import ar.com.angrymachine.hunter.Activity;
import ar.com.angrymachine.hunter.Game;
import ar.com.angrymachine.hunter.GraphicStyles;
import ar.com.angrymachine.hunter.Locale;
import ar.com.angrymachine.hunter.HunterResourceManager;

public class RestActivity extends Activity
{
	private double timeHealingRatio = 0.2;
	
	public RestActivity()
	{
	}
	
	public void update(int delta, boolean action, boolean timeIsRunning)
	{
	    if(timeIsRunning)
	    {
	        if(action)
	        {
	        	Game.current.player.receiveHealing(timeHealingRatio);
	        }
	    }
	}
	
	public void paint(Graphics g, Rectangle activityArea)
	{
		GraphicStyles.paintDefaultActivity(g, this, activityArea, HunterResourceManager.getImage("heart-full.png"));
	}

	public String getDescription()
	{
		return Locale.CAMP;
	}

	public String getActionText()
	{
		if(isRunning())
		{
			return Locale.RESTING;
		}
		else
		{
			return Locale.REST;
		}
	}

	public boolean isCompleted()
	{
		return false;
	}
}
